package com.blue.po.workflow;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.math.BigDecimal;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * 流程业务字段表
 *
 * @author nanjie.chen
 * @email 15696471158@163.com
 * @date 2025-03-10
 */
@Data
@TableName("workflow_business_field")
public class BusinessFieldPO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "业务字段ID")
    private String id;

    @Schema(description = "流程定义ID")
    private String definitionId;

    @Schema(description = "字段英文名")
    private String fieldEnNm;

    @Schema(description = "字段中文名")
    private String fieldCnNm;

    @Schema(description = "字段类型(0-普通文本,1-多行文本,2-数字,3-日期,4-时间,5-日期时间,6-图片,7-文件,8-选择器,9-单选框,10-评分,11-表格)")
    private String fieldType;

    @Schema(description = "字段配置(字段类型为数字-单位,字段类型为选择器和单选框-字典编码)")
    private String fieldConf;

    @Schema(description = "支持修改(0-是,1-否)")
    private String modifyFlag;

    @Schema(description = "必输项(0-是,1-否)")
    private String requiredFlag;

    @Schema(description = "字段排序")
    private BigDecimal sort;

    @Schema(description = "表格字段(0-是,1-否)")
    private String tableFlag;

    @Schema(description = "表格对应的业务字段ID")
    private String fieldId;

    @TableField(exist = false)
    @Schema(description = "表格字段")
    private List<BusinessFieldPO> tableFields;


}
